package com.example.jzg.mvpdemo.bean;


import android.os.Parcel;
import android.os.Parcelable;

/**
 * author: guochen
 * date: 2016/12/2 17:49
 * email: 
 */
public class LoginBean implements Parcelable{
    /**
     * msg :  登陆成功
     * status : 100
     * userId : 5
     * userPic : http://192.168.0.140:8080/image/image4.jpg
     * userType : 3
     */

    private int status;
    private String msg;
    private int userId;
    private String userPic;
    /**
     * 0管理员，1评估师主管，2评估师，3第三方机构，4评估师管理员
     */
    private int userType;
    private int XSDJbol;
    private int XXDJbol;
    private int IsShowDaKa;//是否显示打卡状态
    private int IsWork;
    private String IsDL;//0”不是，“1”是易鑫代理
    private String provinceName;//：省名称
    private int provinceId;//：省id
    private String cityName;//：市名称
    private int cityId;//：市id
    private String nickName;//：昵称
    private String isShowContact;//是否显示联系信息，0 不显示 1显示
    private int UserTypeOp;//0默认(自动)，1自动+线下，2线下, 3线上快速,4线上快速+线下
    private int SetArea;//线下：0：不能选择地区，1：可以选择地区
    private String JpushRegister;  //0 激光注册失败  1注册成功
    private int SetOnLineArea;//是否授权修改线上下单地区
    private int isShowProductType;//是否易鑫代理


    public int getIsShowProductType() {
        return isShowProductType;
    }

    public void setIsShowProductType(int isShowProductType) {
        this.isShowProductType = isShowProductType;
    }

    public String getJpushRegister() {
        return JpushRegister;
    }

    public void setJpushRegister(String jpushRegister) {
        JpushRegister = jpushRegister;
    }

    public int getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(int provinceId) {
        this.provinceId = provinceId;
    }

    public int getCityId() {
        return cityId;
    }

    public void setCityId(int cityId) {
        this.cityId = cityId;
    }

    public int getSetArea() {
        return SetArea;
    }

    public void setSetArea(int setArea) {
        SetArea = setArea;
    }

    public int getUserTypeOp() {
        return UserTypeOp;
    }

    public void setUserTypeOp(int userTypeOp) {
        UserTypeOp = userTypeOp;
    }

    public String getIsShowContact() {
        return isShowContact;
    }

    public void setIsShowContact(String isShowContact) {
        this.isShowContact = isShowContact;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public int getXSDJbol() {
        return XSDJbol;
    }

    public void setXSDJbol(int XSDJbol) {
        this.XSDJbol = XSDJbol;
    }

    public int getXXDJbol() {
        return XXDJbol;
    }

    public void setXXDJbol(int XXDJbol) {
        this.XXDJbol = XXDJbol;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public void setUserPic(String userPic) {
        this.userPic = userPic;
    }

    public void setUserType(int userType) {
        this.userType = userType;
    }


    public int getUserId() {
        return userId;
    }

    public String getUserPic() {
        return userPic;
    }

    public int getUserType() {
        return userType;
    }

    public int getIsShowDaKa() {
        return IsShowDaKa;
    }

    public void setIsShowDaKa(int isShowDaKa) {
        IsShowDaKa = isShowDaKa;
    }

    public int getIsWork() {
        return IsWork;
    }

    public void setIsWork(int isWork) {
        IsWork = isWork;
    }

    public String getIsDL() {
        return IsDL;
    }

    public void setIsDL(String isDL) {
        IsDL = isDL;
    }

    public int getSetOnLineArea() {
        return SetOnLineArea;
    }

    public void setSetOnLineArea(int setOnLineArea) {
        SetOnLineArea = setOnLineArea;
    }

    public static Parcelable.Creator<LoginBean> getCREATOR() {
        return CREATOR;
    }

    public LoginBean() {
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", userPic='" + userPic + '\'' +
                ", userType=" + userType +
                ", XSDJbol=" + XSDJbol +
                ", XXDJbol=" + XXDJbol +
                ", IsShowDaKa=" + IsShowDaKa +
                ", IsWork=" + IsWork +
                ", IsDL='" + IsDL + '\'' +
                '}';
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean isSuccess(){
        return status==100;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.status);
        dest.writeString(this.msg);
        dest.writeInt(this.userId);
        dest.writeString(this.userPic);
        dest.writeInt(this.userType);
        dest.writeInt(this.XSDJbol);
        dest.writeInt(this.XXDJbol);
        dest.writeInt(this.IsShowDaKa);
        dest.writeInt(this.IsWork);
        dest.writeString(this.IsDL);
        dest.writeString(this.provinceName);
        dest.writeInt(this.provinceId);
        dest.writeString(this.cityName);
        dest.writeInt(this.cityId);
        dest.writeString(this.nickName);
        dest.writeString(this.isShowContact);
        dest.writeInt(this.UserTypeOp);
        dest.writeInt(this.SetArea);
        dest.writeString(this.JpushRegister);
        dest.writeInt(this.SetOnLineArea);
        dest.writeInt(this.isShowProductType);
    }

    protected LoginBean(Parcel in) {
        this.status = in.readInt();
        this.msg = in.readString();
        this.userId = in.readInt();
        this.userPic = in.readString();
        this.userType = in.readInt();
        this.XSDJbol = in.readInt();
        this.XXDJbol = in.readInt();
        this.IsShowDaKa = in.readInt();
        this.IsWork = in.readInt();
        this.IsDL = in.readString();
        this.provinceName = in.readString();
        this.provinceId = in.readInt();
        this.cityName = in.readString();
        this.cityId = in.readInt();
        this.nickName = in.readString();
        this.isShowContact = in.readString();
        this.UserTypeOp = in.readInt();
        this.SetArea = in.readInt();
        this.JpushRegister = in.readString();
        this.SetOnLineArea = in.readInt();
        this.isShowProductType = in.readInt();
    }

    public static final Creator<LoginBean> CREATOR = new Creator<LoginBean>() {
        @Override
        public LoginBean createFromParcel(Parcel source) {
            return new LoginBean(source);
        }

        @Override
        public LoginBean[] newArray(int size) {
            return new LoginBean[size];
        }
    };
}
